// TypeScript file
module starlingswf
{

export class StarlingSwfSheetAnalyzer extends RES.SheetAnalyzer
{
    public parseSpriteSheet(texture: egret.Texture, data: any): egret.SpriteSheet
    {
        var frames: any = data.frames;
        if (!frames)
        {
            return;
        }

        var spriteSheet: egret.SpriteSheet = new egret.SpriteSheet(texture);
        for (let name in frames)
        {
            let config: any = frames[name];
            spriteSheet.createTexture(name, config.x, config.y, config.w, config.h,
            -config.offX, -config.offY);
        }
        return spriteSheet;
    }
}
}